home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 99 < prev    next >
Encoding:
Text File  |  1996-08-05  |  2.0 KB  |  63 lines

  1. Path: gryphon.phoenix.net!usenet
  2. From: "Nathan R. Price" <nprice@.interramp.com>
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: Header Includes
  5. Date: Mon, 01 Jan 96 13:37:56 PDT
  6. Organization: Phoenix Data Systems
  7. Message-ID: <NEWTNews.820532400.5300.nprice@dailinxx.phoenix.net>
  8. References: <4c78g0$jmr@spectator.cris.com>
  9. NNTP-Posting-Host: dial60.phoenix.net
  10. Mime-Version: 1.0
  11. Content-Type: TEXT/PLAIN; charset=US-ASCII
  12. X-Newsreader: NEWTNews & Chameleon -- TCP/IP for MS Windows from NetManage
  13.  
  14.  
  15. In Article<4c78g0$jmr@spectator.cris.com>, <mckebp@cris.com> write:
  16. > Path: gryphon.phoenix.net!news.sprintlink.net!news1.cris.com!news
  17. > From: mckebp@cris.com (Rasta Mon)
  18. > Newsgroups: comp.lang.c++
  19. > Subject: Header Includes
  20. > Date: Mon, 01 Jan 1996 02:07:11 GMT
  21. > Organization: Happy Fun World
  22. > Lines: 14
  23. > Message-ID: <4c78g0$jmr@spectator.cris.com>
  24. > NNTP-Posting-Host: crc6-fddi.cris.com
  25. > X-Newsreader: Forte Free Agent 1.0.82
  26. >     On a lot of my header includes, the headers refer to other headers,
  27. > and I find that sometimes I'm getting the same one referred to several
  28. > times when compiling.  I think that if I compiled with each referred
  29. > header individually, the program realizes its mistake, but, during
  30. > compilation, there is the repetition.
  31. >     But, I don't want to refer to each individually, because it would be a
  32. > heck of a lot of typing.
  33. >     If it helps, I am, by the way, using Borland Turbo C++.
  34. >     Is there a way to stop this problem?
  35. >      \\|//    You have received a message from Ben McKenzie       \\//
  36. >      (O-O)                   DON'T PANIC!                    o00o-(,,)-o00o
  37. > +oOO--(_)--OOo MCKEBP@CRIS.COM http://www.cris.com/~mckebp         ()
  38. > a.k.a. Iceman, Goob, Teapot, The Wizard, Blackie Z-Mon, Kermit, MacGyver, 
  39. Beeee, and Rasta Mon
  40.  
  41. I don't know about Borland, but in MSVC++  there are precompiler commands that 
  42. keep a header from being compiled more than once.
  43.  
  44. Basically all of the headers look like this.
  45.  
  46. #ifndef _HEADERNAME
  47. #define _HEADERNAME
  48.  
  49. ...
  50. header info.
  51. ...
  52.  
  53. #endif
  54.  
  55. Anyway, I hope that helps.  
  56.  
  57. Yours,
  58. Nathan R. Price
  59.  
  60.  
  61.